package com.lxh.model;

import java.util.ArrayList;
import java.util.HashMap;

import android.graphics.Bitmap;
import android.util.Log;

public class ContactInfors {
	
	private String contactId;
	private Bitmap contactImage;
	private ArrayList<PhoneNumber> phoneNumbers;
	
	
	public ContactInfors(HashMap<String, String> pairPrefixCodes, String contactId,
			ArrayList<String> inputPhoneNumbers) {
		
		this.contactId = contactId;
		
		this.phoneNumbers = new ArrayList<PhoneNumber>();
		PhoneNumber phoneNumber;

		for (String number : inputPhoneNumbers) {
			
			try {
				phoneNumber = new PhoneNumber(pairPrefixCodes, number);
				this.phoneNumbers.add(phoneNumber);
				
			} catch (Exception e) {
				
				Log.e("UpdatePrefixCode", e.toString());
			}
		}
	}

	public int getPhoneNumberSize(){
		return this.phoneNumbers.size();
	}
	public String getContactId() {
		return this.contactId;
	}
	
	public void setContactImage(Bitmap contactImage){
		this.contactImage = contactImage;
	}

	public Bitmap getContactImage() {
		return this.contactImage;
	}

	public ArrayList<PhoneNumber> getPhoneNumbers(){
		return this.phoneNumbers;
	}
		
	
}
